/**
 * Cambia el campo de la tabla b_tiene_consulta
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSEvent} event the event that triggered the action
 * @private
 *
 * @properties={typeid:24,uuid:"8A187DCC-BDE1-44D0-B306-8C4EE4006A76"}
 */
function cambiar_tiene_consulta(event) {

	if (foundset.getSelectedRecord().b_tiene_consulta == 1){
		foundset.getSelectedRecord().b_tiene_consulta = 0;
	}else{
		foundset.getSelectedRecord().b_tiene_consulta = 1;
	}
}

/**
 * Cambia el campo de la tabla b_tiene_grabacion
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSEvent} event the event that triggered the action
 * @private
 *
 * @properties={typeid:24,uuid:"0814F277-7F81-4F61-A781-311423FFD6E5"}
 */
function cambiar_tiene_grabacion(event) {

	if (foundset.getSelectedRecord().b_tiene_grabacion == 1){
		foundset.getSelectedRecord().b_tiene_grabacion = 0;
	}else{
		foundset.getSelectedRecord().b_tiene_grabacion = 1;
	}
}

/**
 * Cambia el campo de la tabla b_tiene_borrado
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSEvent} event the event that triggered the action
 * @private
 *
 * @properties={typeid:24,uuid:"0F056E0A-0243-4299-9CD7-2D169A634657"}
 */
function cambiar_tiene_borrado(event) {

	if (foundset.getSelectedRecord().b_tiene_borrado == 1){
		foundset.getSelectedRecord().b_tiene_borrado = 0;
	}else{
		foundset.getSelectedRecord().b_tiene_borrado = 1;
	}
}

/**
 * Called before the form component is rendered.<br>Pinta el campo en función del valor
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSRenderEvent} event the render event
 * @private
 * @properties={typeid:24,uuid:"BBF1A4A5-E2A6-497A-9209-95722BFB7AFC"}
 */
function onRender_b_tiene_consulta(event) {
	
	/** @type {JSRecord<db:/pigeon_board/adm_t900_roles>} */
	var record = event.getRecord()
	
	if (record && record.b_tiene_consulta == 1) {
		event.getRenderable().fgcolor = 'green';
	} else  {
		event.getRenderable().fgcolor = 'red';
	}
}

/**
 * Called before the form component is rendered.<br>Pinta el campo en función del valor
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSRenderEvent} event the render event
 * @private
 * @properties={typeid:24,uuid:"4CCF51F6-A2B9-4DD9-8ACD-33425E9D5838"}
 */
function onRender_b_tiene_grabacion(event) {
	
	/** @type {JSRecord<db:/pigeon_board/adm_t900_roles>} */
	var record = event.getRecord()
	
	if (record && record.b_tiene_grabacion == 1) {
		event.getRenderable().fgcolor = 'green';
	} else  {
		event.getRenderable().fgcolor = 'red';
	}
}

/**
 * Called before the form component is rendered.<br>Pinta el campo en función del valor
 * @author Roberto J. Blasco
 * @version 1.0
 * @param {JSRenderEvent} event the render event
 * @private
 * @properties={typeid:24,uuid:"02BE8B84-E986-461C-91DE-8FBE4E3E24B2"}
 */
function onRender_b_tiene_borrado(event) {
	
	/** @type {JSRecord<db:/pigeon_board/adm_t900_roles>} */
	var record = event.getRecord()
	
	if (record && record.b_tiene_borrado == 1) {
		event.getRenderable().fgcolor = 'green';
	} else  {
		event.getRenderable().fgcolor = 'red';
	}
}
